<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>房产中介管理系统</title>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>js/ext/resources/css/ext-all.css" />
<!--<link rel="stylesheet" type="text/css" href="js/ext/resources/css/ytheme-aero.css" />
<link rel="stylesheet" type="text/css" href="js/ext/resources/css/ytheme-vista.css" />-->
<link rel="stylesheet" type="text/css" href="<?=base_url()?>js/ext/resources/css/ytheme-gray.css" />
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/main.css" />
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/loading.css" />
<link rel="stylesheet" type="text/css" href="<?=base_url()?>css/menus.css" />
</head>
<body>
<div id="loading-mask" style="width:100%;height:100%;background:#c3daf9;position:absolute;z-index:20000;left:0;top:0;">&#160;</div>
<div id="loading">
  <div class="loading-indicator"><img src="<?=base_url()?>js/ext/resources/images/default/grid/loading.gif" style="width:16px;height:16px;" align="absmiddle">&#160;装载中...</div>
</div>
<!-- include everything after the loading indicator -->
<script type="text/javascript" src="<?=base_url()?>js/ext/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="<?=base_url()?>js/ext/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="<?=base_url()?>js/ext/ext-all.js"></script>
<script type="text/javascript" src="<?=base_url()?>js/ext/ext-lang-zh.js"></script>
<script type="text/javascript" src="<?=base_url()?>js/menus.js"></script>

<script type="text/javascript">
	Ext.BLANK_IMAGE_URL = "<?=base_url()?>js/ext/resources/images/default/s.gif";
	var	BASE_URL = "<?=site_url()?>";
</script>

<script type="text/javascript" src="<?=base_url()?>js/init.js"></script>
<script type="text/javascript">
var LayoutObject;
var MenuObject;
window.onbeforeunload = function(){return "请不要直接刷新本页面！退出请选择菜单里的“退出”命令！";};
// 当整个文件全部装载完成后执行
Ext.onReady(function(){
    Ext.QuickTips.init();

	LayoutObject = InitLayout();
	MenuObject = InitMainMenu("menubar");
	InitToolbar("toolbar");
	tree = InitMainTree("MainNavigation");

	MenuObject.on('click',function(){LayoutObject.getRegion("center").el.mask()});
	MenuObject.on('beforehide',function(){LayoutObject.getRegion("center").el.unmask()});

    // safari and opera have iframe sizing issue, relayout fixes it
	if(Ext.isSafari || Ext.isOpera){
		LayoutObject.layout();
	}
	
	var loading = Ext.get('loading');
	var mask = Ext.get('loading-mask');
	mask.setOpacity(.8);
	mask.shift({
		xy:loading.getXY(),
		width:loading.getWidth(),
		height:loading.getHeight(), 
		remove:true,
		duration:1,
		opacity:.3,
		easing:'bounceOut',
		callback : function(){
			loading.fadeOut({duration:.2,remove:true});
    		tree.expandAll();
    		Ext.get('MainPanel').dom.src = "<?=base_url()?>index.php/main/welcome";
		}
	});
});
SetMainPanelUrl = function(Url, Title)
{
	if (!Ext.get(Url))
	{

		LayoutObject.beginUpdate();
		var iframe = Ext.DomHelper.append(document.body, {tag:'iframe', id:Url, frameborder:'no'}, true);
		if (!Title)
		{
			Title = Url;
		}
		LayoutObject.add('center', new Ext.ContentPanel(iframe, {title: Title, fitToFrame:true, closable: true}));
		LayoutObject.endUpdate();

	    iframe.dom.src = Url;
	}
	LayoutObject.showPanel(Url);
}

//Ext.EventManager.onDocumentReady(MainInit.init, MainInit, true);
</script>
<div id="MainMenubar" class="x-layout-inactive-content">
  <div id="menubar"></div>
  <div id="toolbar"></div>
</div>
<div id="MainNavigation" class="y-layout-inactive-content">
</div>
<iframe id="MainPanel" frameborder="no"></iframe>
<div id="MainStatusbar" class="x-layout-inactive-content">
  <div id="statusbar">已登录用户: <?=$LoginUsername?></div>
</div>
</body>
</html>